3.3.16 \(\int \frac {x^4 (a+b \log (c x^n))}{d+e x^2} \, dx\) [216]

Optimal. Leaf size=167 \[ -\frac {a d x}{e^2}+\frac {b d n x}{e^2}-\frac {b n x^3}{9 e}-\frac {b d x \log \left (c x^n\right )}{e^2}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}+\frac {d^{3/2} \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{5/2}}-\frac {i b d^{3/2} n \text {Li}_2\left (-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 e^{5/2}}+\frac {i b d^{3/2} n \text {Li}_2\left (\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 e^{5/2}} \]

[Out]

-a*d*x/e^2+b*d*n*x/e^2-1/9*b*n*x^3/e-b*d*x*ln(c*x^n)/e^2+1/3*x^3*(a+b*ln(c*x^n))/e+d^(3/2)*arctan(x*e^(1/2)/d^
(1/2))*(a+b*ln(c*x^n))/e^(5/2)-1/2*I*b*d^(3/2)*n*polylog(2,-I*x*e^(1/2)/d^(1/2))/e^(5/2)+1/2*I*b*d^(3/2)*n*pol
ylog(2,I*x*e^(1/2)/d^(1/2))/e^(5/2)

________________________________________________________________________________________

Rubi [A]
time = 0.14, antiderivative size = 167, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {308, 211, 2393, 2332, 2341, 2361, 12, 4940, 2438} \begin {gather*} -\frac {i b d^{3/2} n \text {PolyLog}\left (2,-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 e^{5/2}}+\frac {i b d^{3/2} n \text {PolyLog}\left (2,\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 e^{5/2}}+\frac {d^{3/2} \text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{5/2}}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}-\frac {a d x}{e^2}-\frac {b d x \log \left (c x^n\right )}{e^2}+\frac {b d n x}{e^2}-\frac {b n x^3}{9 e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^4*(a + b*Log[c*x^n]))/(d + e*x^2),x]

[Out]

-((a*d*x)/e^2) + (b*d*n*x)/e^2 - (b*n*x^3)/(9*e) - (b*d*x*Log[c*x^n])/e^2 + (x^3*(a + b*Log[c*x^n]))/(3*e) + (
d^(3/2)*ArcTan[(Sqrt[e]*x)/Sqrt[d]]*(a + b*Log[c*x^n]))/e^(5/2) - ((I/2)*b*d^(3/2)*n*PolyLog[2, ((-I)*Sqrt[e]*
x)/Sqrt[d]])/e^(5/2) + ((I/2)*b*d^(3/2)*n*PolyLog[2, (I*Sqrt[e]*x)/Sqrt[d]])/e^(5/2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2361

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 2393

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rubi steps

\begin {align*} \int \frac {x^4 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx &=\int \left (-\frac {d \left (a+b \log \left (c x^n\right )\right )}{e^2}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{e}+\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{e^2 \left (d+e x^2\right )}\right ) \, dx\\ &=-\frac {d \int \left (a+b \log \left (c x^n\right )\right ) \, dx}{e^2}+\frac {d^2 \int \frac {a+b \log \left (c x^n\right )}{d+e x^2} \, dx}{e^2}+\frac {\int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx}{e}\\ &=-\frac {a d x}{e^2}-\frac {b n x^3}{9 e}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}+\frac {d^{3/2} \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{5/2}}-\frac {(b d) \int \log \left (c x^n\right ) \, dx}{e^2}-\frac {\left (b d^2 n\right ) \int \frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} \sqrt {e} x} \, dx}{e^2}\\ &=-\frac {a d x}{e^2}+\frac {b d n x}{e^2}-\frac {b n x^3}{9 e}-\frac {b d x \log \left (c x^n\right )}{e^2}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}+\frac {d^{3/2} \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{5/2}}-\frac {\left (b d^{3/2} n\right ) \int \frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{x} \, dx}{e^{5/2}}\\ &=-\frac {a d x}{e^2}+\frac {b d n x}{e^2}-\frac {b n x^3}{9 e}-\frac {b d x \log \left (c x^n\right )}{e^2}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}+\frac {d^{3/2} \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{5/2}}-\frac {\left (i b d^{3/2} n\right ) \int \frac {\log \left (1-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{x} \, dx}{2 e^{5/2}}+\frac {\left (i b d^{3/2} n\right ) \int \frac {\log \left (1+\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{x} \, dx}{2 e^{5/2}}\\ &=-\frac {a d x}{e^2}+\frac {b d n x}{e^2}-\frac {b n x^3}{9 e}-\frac {b d x \log \left (c x^n\right )}{e^2}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}+\frac {d^{3/2} \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{5/2}}-\frac {i b d^{3/2} n \text {Li}_2\left (-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 e^{5/2}}+\frac {i b d^{3/2} n \text {Li}_2\left (\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 e^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 208, normalized size = 1.25 \begin {gather*} \frac {-18 a d \sqrt {e} x+18 b d \sqrt {e} n x-2 b e^{3/2} n x^3-18 b d \sqrt {e} x \log \left (c x^n\right )+6 e^{3/2} x^3 \left (a+b \log \left (c x^n\right )\right )+9 \sqrt {-d} d \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )+9 (-d)^{3/2} \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )+9 b (-d)^{3/2} n \text {Li}_2\left (\frac {\sqrt {e} x}{\sqrt {-d}}\right )-9 b (-d)^{3/2} n \text {Li}_2\left (\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{18 e^{5/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^4*(a + b*Log[c*x^n]))/(d + e*x^2),x]

[Out]

(-18*a*d*Sqrt[e]*x + 18*b*d*Sqrt[e]*n*x - 2*b*e^(3/2)*n*x^3 - 18*b*d*Sqrt[e]*x*Log[c*x^n] + 6*e^(3/2)*x^3*(a +
 b*Log[c*x^n]) + 9*Sqrt[-d]*d*(a + b*Log[c*x^n])*Log[1 + (Sqrt[e]*x)/Sqrt[-d]] + 9*(-d)^(3/2)*(a + b*Log[c*x^n
])*Log[1 + (d*Sqrt[e]*x)/(-d)^(3/2)] + 9*b*(-d)^(3/2)*n*PolyLog[2, (Sqrt[e]*x)/Sqrt[-d]] - 9*b*(-d)^(3/2)*n*Po
lyLog[2, (d*Sqrt[e]*x)/(-d)^(3/2)])/(18*e^(5/2))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.13, size = 693, normalized size = 4.15

method result size
risch \(\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} d x}{2 e^{2}}+\frac {a \,x^{3}}{3 e}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{3}}{6 e}-\frac {b \,d^{2} \arctan \left (\frac {x e}{\sqrt {e d}}\right ) n \ln \left (x \right )}{e^{2} \sqrt {e d}}+\frac {b n \,d^{2} \ln \left (x \right ) \ln \left (\frac {-e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 e^{2} \sqrt {-e d}}-\frac {b n \,d^{2} \ln \left (x \right ) \ln \left (\frac {e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 e^{2} \sqrt {-e d}}+\frac {b \ln \left (c \right ) d^{2} \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{e^{2} \sqrt {e d}}+\frac {b \ln \left (c \right ) x^{3}}{3 e}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{3}}{6 e}+\frac {b \,d^{2} \arctan \left (\frac {x e}{\sqrt {e d}}\right ) \ln \left (x^{n}\right )}{e^{2} \sqrt {e d}}-\frac {b n \,d^{2} \dilog \left (\frac {e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 e^{2} \sqrt {-e d}}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x^{3}}{6 e}+\frac {b n \,d^{2} \dilog \left (\frac {-e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 e^{2} \sqrt {-e d}}-\frac {b \ln \left (x^{n}\right ) d x}{e^{2}}+\frac {a \,d^{2} \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{e^{2} \sqrt {e d}}-\frac {b \ln \left (c \right ) d x}{e^{2}}-\frac {a d x}{e^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} d x}{2 e^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} d x}{2 e^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x^{3}}{6 e}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} d^{2} \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 e^{2} \sqrt {e d}}+\frac {b \ln \left (x^{n}\right ) x^{3}}{3 e}-\frac {b n \,x^{3}}{9 e}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} d^{2} \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 e^{2} \sqrt {e d}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} d^{2} \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 e^{2} \sqrt {e d}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) d x}{2 e^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) d^{2} \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 e^{2} \sqrt {e d}}+\frac {b d n x}{e^{2}}\) \(693\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^4*(a+b*ln(c*x^n))/(e*x^2+d),x,method=_RETURNVERBOSE)

[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ctan(x*e/(e*d)^(1/2))-b*ln(c)/e^2*d*x+1/
6*I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2/e*x^3-a*d*x/e^2+1/3*b*ln(x^n)/e*x^3-1/9*b*n*x^3/e-1/2*I*b*Pi*csgn(I*c)*csgn
(I*x^n)*csgn(I*c*x^n)*d^2/e^2/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))+b*d*n*x/e^2

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^4*(a+b*log(c*x^n))/(e*x^2+d),x, algorithm="maxima")

[Out]

1/3*(3*d^(3/2)*arctan(x*e^(1/2)/sqrt(d))*e^(-5/2) + (x^3*e - 3*d*x)*e^(-2))*a + b*integrate((x^4*log(c) + x^4*
log(x^n))/(x^2*e + d), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^4*(a+b*log(c*x^n))/(e*x^2+d),x, algorithm="fricas")

[Out]

integral((b*x^4*log(c*x^n) + a*x^4)/(x^2*e + d), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{4} \left (a + b \log {\left (c x^{n} \right )}\right )}{d + e x^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**4*(a+b*ln(c*x**n))/(e*x**2+d),x)

[Out]

Integral(x**4*(a + b*log(c*x**n))/(d + e*x**2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^4*(a+b*log(c*x^n))/(e*x^2+d),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*x^4/(x^2*e + d), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^4\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{e\,x^2+d} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4*(a + b*log(c*x^n)))/(d + e*x^2),x)

[Out]

int((x^4*(a + b*log(c*x^n)))/(d + e*x^2), x)

________________________________________________________________________________________